public class Demo250 {
    public static void main(String[] args) {
        Emp emp1 = new emp();
        emp1.setNumber("1001");
        emp1.setName("剑魔");
        emp1.setAge(20);

        System.out.println(emp1);

        Emp emp2 = new Emp();
        emp2.setNumber("1002");
        emp1.setName("亚索");
        emp1.setAge(30);

        Emp emp3 = new Emp(number:"1001",name:"神佬大锅",age:20);

        List<Emp> list = new ArrayList();
        list.add(emp1);
        list.add(emp2);
        list.add(emp3);
        System.out.println("=== 所有员工信息 ===");
        for (Emp emp : list) {
            System.out.println(emp);
            for(int i = 0; i<list.size();i++){
                System.out.println(list.get(i));
            }
   }
}
